<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Category extends CI_Controller {

	public function __construct() {
		parent::__construct();
		$this->load->database();
	}

	public function index()
	{
		$header_data = array();
		$footer_data = array();
		$detail_data = array();

		//add css
		$header_data['add_css'][] = '/zswebshop/include/css/bootstrap-extends.css';
		$header_data['add_css'][] = '/zswebshop/include/css/jquery.treegrid.css';
		$header_data['add_css'][] = '/zswebshop/include/admin/css/category.css';

		//add script
		$footer_data['add_script'][] = '/zswebshop/include/js/jquery.treegrid.js';
		$footer_data['add_script'][] = '/zswebshop/include/js/jquery.treegrid.bootstrap3.js';
		$footer_data['add_script'][] = '/zswebshop/include/admin/js/category.js';

		$this->load->model('/admin/category_mo', 'category_mo');
		$detail_data['category_tree'] = $this->category_mo->get_all_category('0', 0);

		$this->load->view('admin/common/header', $header_data);
		$this->load->view('/admin/category/category_vi', $detail_data);
		$this->load->view('admin/common/footer', $footer_data);
	}
}

?>